package com.ruoyi.wx.controller;

import com.ruoyi.wx.domain.AnnouncementWx;
import com.ruoyi.wx.service.IAnnouncementWxService;
import com.ruoyi.wx.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wx")
public class AnnouncementWxController {

    @Autowired
    private IAnnouncementWxService announcementWxService;


    /**
     * 获取最新公告
     * @return
     */
    @GetMapping("/announcement")
    public Result getAnnouncement(){
        List<AnnouncementWx> announcementWxList = announcementWxService.getAnnouncement();
        return Result.success(announcementWxList);
    }
}
